
use super::common_import::*;

#[pyfunction]
pub fn randint(a: u8, b: u8) -> PyResult<u8> {
    Python::with_gil(|py| {
        let random = py.import("random")?;
        let res = random
            .getattr("randint")?
            .call1((a, b))?.extract::<u8>()?; // call1((a, b))?
        trace!("rand.randint({a}, {b}) -> {res}");
        Ok(res)
    })
}